package com.hyh.ui.base;

import android.app.Activity;

import com.hyh.data.PlatModule;
import com.platform.GosSession;

/**
 * Created by Administrator on 2019/1/26.
 */

public abstract class BasePresenter<T> implements IPresenter<T>,GosSession.OnResponseCallback {

    public Activity mActivity;
    public T mView;
    public PlatModule mPlatModule;

    @Override
    public void attachView(Activity activity, T view) {
        this.mActivity = activity;
        this.mView = view;
        mPlatModule = PlatModule.getInstance();
        mPlatModule.addRecvCallback(this);
    }

    @Override
    public void detachView() {
        mPlatModule.removeRecvCallback(this);
        this.mActivity = null;
        this.mView = null;
    }
}
